package com.medusa.aps.business.modules.board.model.output;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * <p>车间维度生产数据统计项</p>
 * @author An.Yan
 */
@Data
@Accessors(chain = true)
@Schema(description = "车间维度生产数据统计项")
public class WorkshopProductionItemData {

    /**
     * 已排产设备数量
     */
    @Schema(description = "已排产设备数量")
    private Integer scheduledEquipmentCnt;

    /**
     * 未排产设备数量
     */
    @Schema(description = "未排产设备数量")
    private Integer unscheduledEquipmentCnt;

    /**
     * 计划数量
     */
    @Schema(description = "计划数量")
    private Integer plannedCnt;

    /**
     * 关联订单数量
     */
    @Schema(description = "关联订单数量")
    private Integer associatedOrderCnt;

    /**
     * 所属统计日期
     */
    @Schema(description = "所属统计日期")
    private LocalDate statDate;

    public WorkshopProductionItemData(LocalDate statDate) {
        this.scheduledEquipmentCnt = 0;
        this.unscheduledEquipmentCnt = 0;
        this.plannedCnt = 0;
        this.associatedOrderCnt = 0;
        this.statDate = statDate;

    }

    @Override
    public String toString() {
        return
                "已排产设备：" + scheduledEquipmentCnt + "\n" +
                "未排产设备：" + unscheduledEquipmentCnt + "\n" +
                "计划数量：" + plannedCnt + "\n" +
                "关联订单数：" + associatedOrderCnt;
    }
}
